﻿// enter-the-story-alpha.js
//
// This library contains code specific to EnterTheStory.com.
//////////////////////////////////////


// Various stuff
//////////////////////////////////////

// For experimenting with canvas redrawing.
var hue = 0;
function fillRandomColor()
{
	hue = hue + 10 * Math.random();
	context.fillStyle = 'hsl(' + hue + ', 50%, 50%)';
	context.fillRect(0, 0, 640, 480);
}

// Object definitions from Chris
//////////////////////////////////////

// A generic room object: up to 4 floors, up to 4 regions, up to 10 items. Usually less, for speed reasons.
function room(id, name, visited, image, imagemap, tint, fl1, fl2, fl3, fl4, reg1, reg2, reg3, reg4, it1, it2, it3, it4, it5, it6, it7, it8, it9, it10)
{
	this.id = id;
	this.name = name;
	this.visited = visited;
	this.image = image;
	this.imagemap = imagemap;
	this.tint = tint;
	this.floor1 = floor1;
	this.floor2 = floor2;
	this.floor3 = floor3;
	this.floor4 = floor4;
	this.region1 = region1;
	this.region2 = region2;
	this.region3 = region3;
	this.region4 = region4;
	this.item1 = item1;
	this.item2 = item2;
	this.item3 = item3;
	this.item4 = item4;
	this.item5 = item5;
	this.item6 = item6;
	this.item7 = item7;
	this.item8 = item8;
	this.item9 = item9;
	this.item10 = item10;
}
